home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / ltick03 / qbbs.h < prev    next >
C/C++ Source or Header  |  1993-05-23  |  2KB  |  99 lines

  1. /* 
  2.  *    QBBS Message base structures header file 
  3.  *
  4.  *    Public Domain.
  5.  */
  6.  
  7. #ifndef WORD
  8. #define WORD short
  9. #endif
  10.  
  11. #ifndef LONG
  12. #define LONG unsigned long
  13. #endif
  14.  
  15. #ifndef UWORD
  16. #define UWORD unsigned short
  17. #endif
  18.  
  19. #ifndef BYTE
  20. #define BYTE char
  21. #endif
  22.  
  23. typedef struct 
  24. {
  25.     char    from[36];
  26.     char    to[36];
  27.     char    subject[72];
  28.     char    time[20];
  29.     LONG    stamp;
  30.     LONG    msgoffset;
  31.     UWORD   reserved1;
  32.     UWORD   reply_to;
  33.     UWORD   attrib;
  34.     WORD    mailer[8];
  35.     UWORD   size;
  36.     UWORD   read_count;
  37.     UWORD   cost;
  38.     UWORD   o_zone;
  39.     UWORD   o_net;
  40.     UWORD   o_node;
  41.     UWORD   o_point;
  42.     UWORD   d_zone;
  43.     UWORD   d_net;
  44.     UWORD   d_node;
  45.     UWORD   d_point;
  46. }
  47.  
  48. QBBS_MHEADER;
  49.  
  50. /* user.bbs */
  51.  
  52. #define MAXLOGIN    7
  53. #define MAXNAME    30
  54. #define MAXPASS    12
  55. #define MAXPHONE    12
  56. #define MAXLOC        10
  57.  
  58. typedef struct {
  59.     BYTE junk; /* !! pascal strings !! :-( */
  60.     char name[36];
  61.     char city[26];
  62.     char pass[16];
  63.     char phone[12];
  64.     char reserved1[13]; /* dataph */
  65.     char reserved2[6]; /* tm */
  66.     char reserved3[9]; /* date */
  67.     BYTE attrib; /* Bit0: Delete, Bit1: ClrScr, Bit3: FSE */
  68.     BYTE flags[4];
  69.     WORD credit;
  70.     WORD lastday; /* since 1/1/70, time()/86400 on unix systems */
  71.     WORD posted;
  72.     WORD isansi;
  73.     WORD security;
  74.     WORD calls;
  75.     WORD upload;
  76.     WORD download;
  77.     WORD dlkb;
  78.     WORD dlkb_today;
  79.     WORD seconds_today;
  80.     WORD scr_len;
  81.     char login[8]; /* lazybbs extension */
  82. } QBBS_USERS;
  83.  
  84. #define GetUserFlag(u,c,n)    (u->flags[c] & (1<<n))
  85. #define SetUserFlag(u,c,n)    (u->flags[c]|=(1<<n))
  86. #define ResetUserFlag(u,c,n)    (u->flags[c]&=(!(1<<n))
  87.  
  88. #define USATTR_KILLED    0x01
  89. #define USATTR_FSE        0x07
  90.  
  91. #define KILLFLAG 0x8000
  92. #define POSTFLAG 0x0100  /* 'Local' */
  93. #define PRVTFLAG 0x0001  /* 'Private' */
  94. #define CRASFLAG 0x0002  /* crashmail */
  95. #define RCVDFLAG 0x0004  /* mail read */
  96.  
  97. #define StrPasToC(a) (a[(int)(*((char *)a-1))]=0)
  98. #define StrCToPas(a) (*((char *)a-1)=strlen(a))
  99.